package com.daoeping.data;

import java.util.Date;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

/**
 * Usr_userbasicinfo entity. @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "usr_userbasicinfo", catalog = "daoeping")
public class Usr_userbasicinfo implements java.io.Serializable {

	// Fields

	private Integer id;
	private Usr_user usr_user;
	private Bsc_polity bsc_polity;
	private Bsc_address bsc_addressByRegisteredAddressId;
	private Bsc_nationality bsc_nationality;
	private Bsc_address bsc_addressByLiveAddressId;
	private Bsc_native bsc_native;
	private Bsc_ethnicity bsc_ethnicity;
	private Bsc_idcardtype bsc_idcardtype;
	private String name;
	private String nickname;
	private Integer gender;
	private Date birthday;
	private String idcardNum;
	private Integer workYear;
	private Integer graduated;
	private Integer married;
	private Date registeredDate;

	// Constructors

	/** default constructor */
	public Usr_userbasicinfo() {
	}

	/** minimal constructor */
	public Usr_userbasicinfo(Usr_user usr_user, String name) {
		this.usr_user = usr_user;
		this.name = name;
	}

	/** full constructor */
	public Usr_userbasicinfo(Usr_user usr_user, Bsc_polity bsc_polity,
			Bsc_address bsc_addressByRegisteredAddressId,
			Bsc_nationality bsc_nationality,
			Bsc_address bsc_addressByLiveAddressId, Bsc_native bsc_native,
			Bsc_ethnicity bsc_ethnicity, Bsc_idcardtype bsc_idcardtype,
			String name, String nickname, Integer gender, Date birthday,
			String idcardNum, Integer workYear, Integer graduated,
			Integer married, Date registeredDate) {
		this.usr_user = usr_user;
		this.bsc_polity = bsc_polity;
		this.bsc_addressByRegisteredAddressId = bsc_addressByRegisteredAddressId;
		this.bsc_nationality = bsc_nationality;
		this.bsc_addressByLiveAddressId = bsc_addressByLiveAddressId;
		this.bsc_native = bsc_native;
		this.bsc_ethnicity = bsc_ethnicity;
		this.bsc_idcardtype = bsc_idcardtype;
		this.name = name;
		this.nickname = nickname;
		this.gender = gender;
		this.birthday = birthday;
		this.idcardNum = idcardNum;
		this.workYear = workYear;
		this.graduated = graduated;
		this.married = married;
		this.registeredDate = registeredDate;
	}

	// Property accessors
	@Id
	@GeneratedValue
	@Column(name = "id", unique = true, nullable = false)
	public Integer getId() {
		return this.id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	@ManyToOne(fetch = FetchType.EAGER)
	@JoinColumn(name = "user_id", nullable = false)
	public Usr_user getUsr_user() {
		return this.usr_user;
	}

	public void setUsr_user(Usr_user usr_user) {
		this.usr_user = usr_user;
	}

	@ManyToOne(fetch = FetchType.EAGER)
	@JoinColumn(name = "polity_id")
	public Bsc_polity getBsc_polity() {
		return this.bsc_polity;
	}

	public void setBsc_polity(Bsc_polity bsc_polity) {
		this.bsc_polity = bsc_polity;
	}

	@ManyToOne(fetch = FetchType.EAGER)
	@JoinColumn(name = "registered_address_id")
	public Bsc_address getBsc_addressByRegisteredAddressId() {
		return this.bsc_addressByRegisteredAddressId;
	}

	public void setBsc_addressByRegisteredAddressId(
			Bsc_address bsc_addressByRegisteredAddressId) {
		this.bsc_addressByRegisteredAddressId = bsc_addressByRegisteredAddressId;
	}

	@ManyToOne(fetch = FetchType.EAGER)
	@JoinColumn(name = "nationality_id")
	public Bsc_nationality getBsc_nationality() {
		return this.bsc_nationality;
	}

	public void setBsc_nationality(Bsc_nationality bsc_nationality) {
		this.bsc_nationality = bsc_nationality;
	}

	@ManyToOne(fetch = FetchType.EAGER)
	@JoinColumn(name = "live_address_id")
	public Bsc_address getBsc_addressByLiveAddressId() {
		return this.bsc_addressByLiveAddressId;
	}

	public void setBsc_addressByLiveAddressId(
			Bsc_address bsc_addressByLiveAddressId) {
		this.bsc_addressByLiveAddressId = bsc_addressByLiveAddressId;
	}

	@ManyToOne(fetch = FetchType.EAGER)
	@JoinColumn(name = "native_id")
	public Bsc_native getBsc_native() {
		return this.bsc_native;
	}

	public void setBsc_native(Bsc_native bsc_native) {
		this.bsc_native = bsc_native;
	}

	@ManyToOne(fetch = FetchType.EAGER)
	@JoinColumn(name = "ethnicity_id")
	public Bsc_ethnicity getBsc_ethnicity() {
		return this.bsc_ethnicity;
	}

	public void setBsc_ethnicity(Bsc_ethnicity bsc_ethnicity) {
		this.bsc_ethnicity = bsc_ethnicity;
	}

	@ManyToOne(fetch = FetchType.EAGER)
	@JoinColumn(name = "idcardtype_id")
	public Bsc_idcardtype getBsc_idcardtype() {
		return this.bsc_idcardtype;
	}

	public void setBsc_idcardtype(Bsc_idcardtype bsc_idcardtype) {
		this.bsc_idcardtype = bsc_idcardtype;
	}

	@Column(name = "name", nullable = false, length = 50)
	public String getName() {
		return this.name;
	}

	public void setName(String name) {
		this.name = name;
	}

	@Column(name = "nickname", length = 45)
	public String getNickname() {
		return this.nickname;
	}

	public void setNickname(String nickname) {
		this.nickname = nickname;
	}

	@Column(name = "gender")
	public Integer getGender() {
		return this.gender;
	}

	public void setGender(Integer gender) {
		this.gender = gender;
	}

	@Temporal(TemporalType.DATE)
	@Column(name = "birthday", length = 10)
	public Date getBirthday() {
		return this.birthday;
	}

	public void setBirthday(Date birthday) {
		this.birthday = birthday;
	}

	@Column(name = "idcard_num", length = 45)
	public String getIdcardNum() {
		return this.idcardNum;
	}

	public void setIdcardNum(String idcardNum) {
		this.idcardNum = idcardNum;
	}

	@Column(name = "work_year")
	public Integer getWorkYear() {
		return this.workYear;
	}

	public void setWorkYear(Integer workYear) {
		this.workYear = workYear;
	}

	@Column(name = "graduated")
	public Integer getGraduated() {
		return this.graduated;
	}

	public void setGraduated(Integer graduated) {
		this.graduated = graduated;
	}

	@Column(name = "married")
	public Integer getMarried() {
		return this.married;
	}

	public void setMarried(Integer married) {
		this.married = married;
	}

	@Temporal(TemporalType.DATE)
	@Column(name = "registered_date", length = 10)
	public Date getRegisteredDate() {
		return this.registeredDate;
	}

	public void setRegisteredDate(Date registeredDate) {
		this.registeredDate = registeredDate;
	}

}